Versions:
SWIG is an interface compiler that connects programs written in C and C++ with scripting languages such as Perl, Python, Ruby and Tcl. It works by taking the declarations found in C/C++ header files and using them to generate the wrapper code that scripting languages need in order to access the underlying C/C++ code. Writing such wrappers by hand is repetitive and error-prone, and SWIG automates the task so that existing libraries can be made available to higher-level languages with far less effort. The tool belongs to the category of developer tools for language bindings and code generation. Typical use cases include exposing a performance-critical C or C++ library to Python for scientific computing or data analysis, building scripting interfaces for large applications so that they can be controlled and tested from a script, creating bindings for several target languages from one interface description and rapid prototyping in which a scripting language drives compiled code. Library authors, researchers and application developers who combine compiled and interpreted languages are the main users. SWIG is run as a command-line program as part of a build process. The current version is 4.5.1, and several versions are available in the catalog.
Tags: